package adaptdesignmode;
public class BookT {
    public static void main(String[] args) {
        BookShelf bookshelf=new BookShelf();
        bookshelf.appendBook(new Book("情书"));
        bookshelf.appendBook(new Book("白夜行"));
        bookshelf.appendBook(new Book("小卖铺"));
        bookshelf.appendBook(new Book("三体"));
        bookshelf.appendBook(new Book("放风筝的人"));
        MIterator<Book> it= bookshelf.iterator();
        while(it.hasNext()){
            Book book=(Book) it.next();
            System.out.println(book.getName());
        }
    }
}
